﻿<%@ Page Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="TaskDispatch.aspx.cs" Inherits="TaskDispatch" Title="Untitled Page" %>
<%@ Register Src="../Controls/TabsMenu/TabsMenu.ascx" TagName="TabsMenu" TagPrefix="uc1" %>
<%@ Register src="TaskPersonItem.ascx" tagname="TaskPersonItem" tagprefix="uc1" %>
<%@ Register src="GoodItemOut.ascx" tagname="GoodItemOut" tagprefix="uc1" %>
<%@ Register src="../Controls/TipMessage/TipMessage.ascx" tagname="TipMessage" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<uc1:TipMessage ID="tipMessage1" runat="server" style="width:95%;" />
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                客户：
                </td>
                <td>
                <asp:TextBox ID="S_Guest" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                电话：
                </td>
                <td>
                <asp:TextBox ID="S_Phone" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                处理状态：
                </td>
                <td><div class="select"><div><ofcc:DropDownList ID="S_TaskState" runat="server">
                            <asp:ListItem Value="">请选择</asp:ListItem>
                            <asp:ListItem Value="0">已受理</asp:ListItem>
                            <asp:ListItem Value="1">已派发</asp:ListItem>
                            <asp:ListItem Value="2">已完成</asp:ListItem>
                            <asp:ListItem Value="3">已作废</asp:ListItem>
                          </ofcc:DropDownList>
                          </div></div>
                </td>
                <td>
                    &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">任务派发</div>
    <div class="webPanelContent">
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                        <asp:HiddenField ID = "HiddenField1" runat="server" Value='<%#Eval("TaskItemID") %>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:HyperLinkField DataTextField="GroupName" HeaderText="组别" NavigateUrl="#"/> 
                <asp:BoundField DataField="Guest" HeaderText="客户" />
                <asp:BoundField DataField="HouseNo" HeaderText="区域/楼号" />   
                <asp:BoundField DataField="RoomNo" HeaderText="房间号" />    
                <asp:BoundField DataField="Phone" HeaderText="电话" />          
                <asp:BoundField DataField="Username" HeaderText="受理人" /> 
                <asp:BoundField DataField="CreateDate" HeaderText="受理时间" />
                <asp:BoundField DataField="TaskState" HeaderText="处理状态" />
                <asp:BoundField DataField="ReqStatus" HeaderText="库房状态" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >任务派发</ofcc:LinkButton>     
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="确定要作废吗?" OnClick="btnRemove_Click" CssClass="linkButton" >作废</ofcc:LinkButton>
    <span id="spanTime" style="font-size:22px; padding-left:20px;"></span>
</div>
</asp:Panel>


<asp:Panel ID="pnlEdit" runat="server" Width="95%" Visible="false" CssClass="centerPanel">

<%--<uc1:TabsMenu ID="tabsMenu" runat="server" OnPreRender="btnPreTabsMenu_Click"/>--%>
   <asp:Panel ID="pnlTaskInfo" runat="server">
        <div class="webPanelBorder" >
        <div class="webPanelCaption">基本信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">单位/用户：
                    </td>
                    <td><asp:Literal ID="tbGuest" runat="server"></asp:Literal>  
                    </td>                    
                </tr>
                <tr> 
                    <td class="tableSubjectWidth">联系电话：
                    </td>
                    <td><asp:Literal ID="tbPhone" runat="server"></asp:Literal> 
                    </td>
                </tr>
                <tr> 
                    <td>楼号/区域：
                    </td>
                    <td><asp:Literal ID="cbHouseNo" runat="server"></asp:Literal>
                    </td>
                </tr>     
                <tr> 
                    <td>房间号：
                    </td>
                    <td ><asp:Literal ID="tbRoomNo" runat="server"></asp:Literal>
                    </td>
                </tr>               
                <tr>
                    <td>事由(要求)：</td>
                    <td><asp:Literal ID="tbTroubleDescription" runat="server" ></asp:Literal>
                    <br />
                    受理人：<asp:Label ID="lbUserID" runat="server" Text=""></asp:Label>&nbsp;
                    经办部门：<asp:Label ID="lbOrgID" runat="server" Text=""></asp:Label>&nbsp;
                    受理时间：<asp:Label ID="lbCreateDate" runat="server" Text=""></asp:Label>                    
                    </td>
                </tr>
                <tr> 
                    <td>是否领取物料：
                    </td>
                    <td ><asp:CheckBox ID="cbIsReqGood" Enabled="false" runat="server" Text="选择后在库房自动产生出库单"></asp:CheckBox>
                    </td>
                </tr>
                </table>  
        </div>
        </div>
   
   </asp:Panel>   
   <asp:Panel ID="pnlTaskPerson" runat="server"> 
        <div class="webPanelBorder">
           <div class="webPanelCaption">
                <asp:Label ID="showTitle" runat="server" Text="领单人员"></asp:Label>
           </div>
            <div class="webPanelContent">
                <ofcc:GridView ID="gridReceiverView" runat="server" AutoGenerateColumns="False">
                <Columns>        
                    <asp:BoundField DataField="OrgName" HeaderText="单位" />
                    <asp:BoundField DataField="UserName" HeaderText="姓名" />
                    <asp:BoundField DataField="GroupName" HeaderText="组别" />
                    <asp:BoundField DataField="Mobile" HeaderText="电话" />
                    <asp:BoundField DataField="Description" HeaderText="备注" />
                </Columns>
                </ofcc:GridView> 
            </div>
        </div>
        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
            <ContentTemplate> 
                <uc1:TaskPersonItem ID="TaskPersonItem" ShowTitle="工作人员" runat="server"  />
               <%-- <uc1:GoodItemOut ID="GoodItemOut" runat="server" Visible=false /> --%>
               
                <asp:Panel ID="pnlSearchPerson" runat="server" Visible="false">
                        <span style="float:left">人员编码:&nbsp;<ofcc:ToolTip CssClass="tip" ToolTip="扫描或者输入编码后按回车"  ID="ToolTip2" runat="server" />
                        &nbsp;&nbsp;<asp:TextBox ID="tbPersonCode" runat="server" CssClass="smallInput"></asp:TextBox></span>
                        <script type="text/javascript">
                            function pageLoad() {
                                $get('<%=tbPersonCode.ClientID%>').focus();
                            }
                        </script>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>    
    </asp:Panel> 
    <div class="webPanelButtonArea">
        <ofcc:LinkButton ID="btnSearchPerson" runat="server" OnClick="btnSearchPerson_Click" CssClass="linkButton" >扫描人员</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" >选择工作人员</ofcc:LinkButton>
        <%--<ofcc:LinkButton ID="btnSelectGood" runat="server" OnClick="btnSelectGood_Click" CssClass="linkButton" >选择物料</ofcc:LinkButton>--%>
        <ofcc:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">派发</ofcc:LinkButton>
        <%--<ofcc:LinkButton ID="btnDocument" runat="server" OnClick="btnDocument_Click" CssClass="linkButton" ValidationGroup="submit">导出</ofcc:LinkButton>--%>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">返回</ofcc:LinkButton>
    </div>
</asp:Panel>

<iframe id="ifdown" src="" style="display:none;" runat="server"></iframe>
<asp:HiddenField ID="hfAddOrEdit" runat="server" />
<asp:HiddenField ID="hfCurrentGroupCode" runat="server" />
<asp:HiddenField ID="hfIsGroup" runat="server" />
<asp:HiddenField ID="hfTaskItemID" runat="server" />  
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />
</asp:Content>

